package com.myNovel.novel.controller.front;

import cn.hutool.captcha.CaptchaUtil;
import cn.hutool.captcha.LineCaptcha;
import com.myNovel.novel.core.common.constant.ApiRouterConstants;
import com.myNovel.novel.core.common.resp.RestResp;
import com.myNovel.novel.dto.resp.ImgVerifyCodeRespDto;
import com.myNovel.novel.service.ResourceService;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @Author：Guxx
 * @Package：com.myNovel.novel.controller.front
 * @Date：2024/3/30 12:21
 * @Filename：LoginController
 */
@RestController
@RequestMapping(ApiRouterConstants.API_FRONT_HOME_URL_PREFIX)
@RequiredArgsConstructor
public class ResourceController {
    private final ResourceService resourceService;

    @GetMapping("img_verify_code")
    public RestResp<ImgVerifyCodeRespDto> getImgVerifyCode() throws IOException{
        return resourceService.getImgVerifyCode();
    }
}
